﻿<Window x:Class="CodeSHARPer.View.Dialogs.NewFileView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="New File" Height="600" Width="600"
        ShowInTaskbar="false"
        ResizeMode="NoResize" WindowStyle="ToolWindow" WindowStartupLocation="CenterOwner">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <ListView Grid.Row="0" BorderThickness="0"
                  ItemsSource="{Binding FileTypes}"
                  SelectedItem="{Binding SelectedFileType}">
            <ListView.View>
                <GridView>
                    <GridView.ColumnHeaderContainerStyle>
                        <Style>
                            <Setter Property="FrameworkElement.Visibility" Value="Collapsed"/>
                        </Style>
                    </GridView.ColumnHeaderContainerStyle>
                    <GridViewColumn Header="Image">
                        <GridViewColumn.CellTemplate>
                            <DataTemplate>
                                <Image Source="{Binding ImageSource}"  />
                            </DataTemplate>
                        </GridViewColumn.CellTemplate>
                    </GridViewColumn>
                    <GridViewColumn Header="Name">
                        <GridViewColumn.CellTemplate>
                            <DataTemplate>
                                <StackPanel Orientation="Vertical">
                                    <TextBlock Text="{Binding Name}" TextAlignment="Left"/>
                                    <TextBlock Text="{Binding Description}" TextAlignment="Left"/>
                                </StackPanel>
                            </DataTemplate>
                        </GridViewColumn.CellTemplate>
                    </GridViewColumn>
                </GridView>
            </ListView.View>
        </ListView>

        <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Right">
            <Button Content="OK" Width="75" IsDefault="True" Margin="5" Padding="3"
                    Command="{Binding CloseActivePopUpCommand}" CommandParameter="True" />
            <Button Content="Cancel" Width="75" IsCancel="True" Margin="5" Padding="3"/>
        </StackPanel>
    </Grid>
</Window>
